<h1>Purchase</h1>
<div class="content_wrp">
  <div class=" clear container">
    <?php if (isset($ticket) && $ticket->getStatus() == Constants::STATUS_PAYMENT_SUCCESS) : ?>
    <div class="sucessbox" >
      <div class="confirmbox">
        <div class="titlbox clearfix"> <em>ss</em>
          <h2>Your payment has been successfully processed.</h2>
        </div>
        <div class="contbox">
          <p>Please check your email for details.</p>
        </div>
      </div>
    </div>
    <div id="cn_list">
      <table>
        <tbody>
          <tr>
            <td class="lbl">Receipt ID</td>
            <td class="spce">:</td>
            <td class="values"><?php echo $receiptInfo['receiptid']; ?></td>
          </tr>
          <tr>
            <td class="lbl">Movie</td>
            <td class="spce">:</td>
            <td class="values"><?php echo $receiptInfo['movie']; ?></td>
          </tr>
          <tr>
            <td class="lbl">Cinema</td>
            <td class="spce">:</td>
            <td class="values"><?php echo $receiptInfo['cinema']; ?></td>
          </tr>
          <tr>
            <td class="lbl">Session Time</td>
            <td class="spce">:</td>
            <td class="values"><?php echo $receiptInfo['sessiontime']; ?></td>
          </tr>
          <tr>
            <td class="lbl">Quantity</td>
            <td class="spce">:</td>
            <td class="values"><?php echo $receiptInfo['quantity']; ?></td>
          </tr>
          <tr>
            <td class="lbl">Total Price</td>
            <td class="spce">:</td>
            <td class="values"><?php echo $receiptInfo['price']; ?></td>
          </tr>
        </tbody>
      </table>
    </div>
    <div>
      <div class="frmbox_fl">
        <div class="clear">
          <input name="<?php echo $receiptInfo['ticid']; ?>" type="button" value="Print the receipt" class="btn blue show_receipt" name="<?php echo $receiptInfo['ticid']; ?>">
            <?php if (isset($signup) && $signup) : ?>
          <input name="" type="button" value="Continue &raquo;" class="btn gray" onclick="document.location='<?php echo url_for('@signup'); ?>'">
            <?php else : ?>
              <?php if ($sf_user->isAuthenticated()) : ?>
          <input name="" type="button" value="Continue &raquo;" class="btn gray" onclick="document.location='<?php echo url_for('@tickets'); ?>'">
              <?php else : ?>

              <?php endif; ?>
            <?php endif; ?>
        </div>
      </div>
    </div>
      <?php include_partial('home/popup', array('isHidden' => 1)); ?>

    <?php else : ?>

    <div class="errorbox" >
      <div class="confirmbox">
        <div class="titlbox clearfix"> <em>ss</em>
          <h2>Sorry, your payment has failed.</h2>
        </div>
        <div class="contbox">
          <p><?php echo $data['ewayTrxnError']; ?></p>
        </div>
      </div>
    </div>
    <div>
      <div class="frmbox_fl">
        <div class="clear">
          <?php if (isset($offer) && isset($movie)) : ?>
          <input name="" type="button" value="&laquo; Back to Offer" class="btn gray" onclick="document.location='<?php echo SystemUtil::generatePurchaseLink($offer, $movie); ?>?q=1'">
          <?php endif; ?>
        </div>
      </div>
    </div>
    <?php endif; ?>
  </div>
</div>